/**
 * @ProjectName : MyApplication
 * @FileName : BaseResponse
 * @Author : 卢其鹏
 * @Time : 2024/8/7 09:00
 * @Description :
 */



import AxiosRequest from './AxiosRequest';
import { BaseResponse } from '@ohos/BaseLibrary/src/main/ets/http/BaseResponse';

let baseUrl = "https://api.eyesnews.cn/"

/**
 * 获取分类详情接口
 * @param id
 * @param start
 */
export function getCategoryDetailList(versionCode: string, cate_id: string,isShowLoading:boolean) {
  return AxiosRequest.post<BaseResponse<NewsInfo>>({
      url: baseUrl + "appAPI/index.php?act=news&op=getCatePageList",
      params: {
        "versionCode": versionCode,
        "cate_id": cate_id
      },
      headers: undefined,
      showLoading: isShowLoading
  }).catch()
}



export class NewsInfo{
  //置顶新闻
  headlines:ListEntity[]
  //新闻数据
  list:ListEntity[]
  scroll:ScrollEntity[]
  //轮播图
  hdp:HdpEntity[]

  code:string
}

export class CommentList {
  nc_id?: string
  nc_newsId?: string
  nc_newsTitle?: string
  nc_memberId?: string
  nc_memberName?: string
  nc_content?: string
  nc_addtime: string
  nc_memberIp?: string
  nc_status?: string
  nc_dings?: string
  pid?: string
  reply_name: string
  member_icon?: string
  nc_antilog?: string
  atlas?: string
  is_bbs?: string
  nc_status_time?: string
  nc_member_mobile?: string
  reply_count: string
  province: string
  reply_info: ReplyInfo
  if_like?: number
}

export class ReplyInfo {
  nc_id?: string
  nc_newsId?: string
  nc_newsTitle?: string
  nc_memberId?: string
  nc_memberName?: string
  nc_content?: string
  nc_addtime: string
  nc_memberIp?: string
  nc_status?: string
  nc_dings?: string
  pid?: string
  reply_name?: string
  member_icon?: string
  nc_antilog?: string
  atlas?: string
  is_bbs?: string
  nc_status_time?: string
  nc_member_mobile?: string
  if_like?: number
  province?: string
}

export class ListEntity{
  news_id:string
  news_title:string
  news_addtime:string
  label_names:string
  news_type:number
  news_reporterName:string
  news_thumb:string
  news_tags:string
  adurl:string
  playurl:string
  shareurl:string
  cmt_num:string
  is_special:string
  special_mode:string
  special_id:string
  views:string
  playstate:string
  playtime:string
  news_thumb2:string[]
  news_mediaName:string
  is_collect:number
  is_like:number
  is_allow_like:string
  like_sum:string
  share_sum:string
  heat:number
  is_ping:string
  interrogate_img:string
  applets_id:string
  applets_url:string
  is_show_more:string
  album_id:string
  album_name:string
  album_type:string
  ext_id:string
  album_client_style:string
  cover_square_thumb:string
  cover_rectangle_thumb:string
  album_desc:string
  count:string
  source:string
  like_count:string
  column_list:ScrollEntity[]
  news_info:string
  special_lable_name:string
  video_show_type:number
  live_stime:string
}
export class ScrollEntity{
  news_id:string
  news_title:string
  news_addtime:string
  label_names:string
  news_type:number
  news_reporterName:string
  news_thumb:string
  news_tags:string
  adurl:string
  playurl:string
  playtime:string
  playstate:string
  shareurl:string
  cmt_num:string
  is_special:string
  hdp_image:string
  news_thumb2:string[]
  special_id:string
  special_mode:string
  views:string
  news_mediaName:string
  hot_comment:string
  news_views:string
  hot_views:string
  heat:number
  is_ping:string
  applets_id:string
  applets_url:string
  is_allow_like:string
  live_stime:string
}
export class NewsDetailInfo{
  news_info:NesInfoEntity
  if_collect:number
  if_like:number
  comm_count:string
  like_count:string
  news_url:string
  read_news_score:string
  have_video:string
  video_list:string[]
  content_info:ContentInfoEntity[]
}
export class HdpEntity{
  news_id:string
  news_title:string
  news_addtime:string
  label_names:string
  news_type:number
  news_reporterName:string
  news_thumb:string
  news_tags:string
  adurl:string
  playurl:string
  playtime:string
  shareurl:string
  cmt_num:string
  is_special:string
  special_mode:string
  hdp_image:String
  news_thumb2:string[]
  special_id:string
  special_info:string
  views:string
  news_mediaName:string
  heat:number
  is_ping:string
  applets_id:string
  applets_url:string
  news_info:string
  is_allow_like:string
  live_stime:string

}

export class ContentInfoEntity{
  content:string
  img_url:string
}
export class NesInfoEntity{
  news_id:string
  cate_ids:string
  cate_names:string
  news_title:string
  news_tags:string
  news_info:string
  news_type:string
  news_mediaId:string
  news_thumb2:string
  news_thumb:string
  news_addtime:string
  news_views_base:string
  news_views:string
  news_reporterName:string
  news_reporterId:string
  news_status:string
  news_edittime:string
  news_is_top:string
  news_sort:string
  new_is_recommend:string
  is_delete:string
  label_ids:string
  label_names:string
  special_ids:string
  is_show_ads:string
  is_ping:string
  is_original:string
  is_allow_like:string
  news_mediaName:string
  cmt_num:number
  adurl:string
  playurl:string
  shareurl:string
  playstate:string
  playtime:string
  dy_link:string
}